package com.ks.app.admin.util;

import java.net.*;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.Tag;
import javax.servlet.jsp.tagext.TagSupport;


public class EncodeUrlParam extends TagSupport{

	private static final long serialVersionUID = -8687707058920151141L;
	
	private String input = "";
	
	public String getInput() {
		return input;
	}
	public void setInput(String input) {
		this.input = input;
	}
	public int doStartTag() throws JspException {
		JspWriter out=pageContext.getOut();
		try {
			out.print(URLEncoder.encode(input,"utf-8"));
		} catch (Exception e) {

		}
        return Tag.EVAL_BODY_INCLUDE;
    }
	public int doEndTag() throws JspException
    {
        return EVAL_PAGE;

    }

}
